package com.itheima.springbootcondition.config;

import com.itheima.springbootcondition.condition.ClassCondition;
import com.itheima.springbootcondition.condition.ConditionOnClass;
import com.itheima.springbootcondition.domain.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * @author wuli
 * @create 2021-10-21 22:15
 */
@Configuration
public class UserConfig {

    @Bean
    @ConditionOnClass("java.lang.String")
    public User user() {
        return new User();
    }
}
